#include <stdio.h>
int main()
{
	char x;
	int i=1;
	int a=0,b=0,c=0,d=0;
	while(i<=15)
	{
		x=getchar();
		if(x>='a'&&x>='z'||x>='A'&&x<='Z')
			a++;
		else if(x>='0'&&x<='9')
			b++;
		else if(x=='')
			c++;
		else
			d++;
    }
	printf("%d  %d  %d  %d\n",a,b,c,d);
}
